package main

import (
	"ChatingYourself/global"
	"ChatingYourself/router"
	"fmt"
	_ "github.com/go-sql-driver/mysql"
	"math/rand"
	"time"
)

func init() {
	rand.Seed(time.Now().Unix())
	err := global.SetupDBLink()
	if err != nil {
		fmt.Printf("init.SetupDBLinkError:%v", err)
		return
	}
}

func main() {
	r := router.Router()
	panic(r.Run(":8081"))
}
